<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="/system/include/taglib.jsp"%>
<html>
<head>
<base href="${pageScope.basePath }">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>中山市美斯特实业有限公司</title>
<link type="text/css" rel="stylesheet" href="system/css/style.css" />
<script type="text/javascript" language="javascript" src="system/js/public.js"></script>
<script type="text/javascript" language="javascript">
	function checkForm(){
		var roleName=trim($$("roleName").value);
		if(roleName==""){
			alert("请填写角色名称！");
			$$("roleName").select();
			return false;
		}
		var roleNote=$$("roleNote").value;
		if(roleNote.length>100){
			alert("角色描术内容长度不能超过100，请检查！");
			$$("roleName").select();
			return false;
		}
	}
</script>
</head>
<body>
<div class="main">
	<div class="position">当前位置: <a href="sysadm/desktop.jsp">桌 面</a> → 修改角色</div>
	<div class="mainbody">
		<div class="toolbar">
			工具栏：
		</div>
		<div class="operate_info">操作说明：带 * 号必填</div>
		<div class="table">
			<mytag:View name="role" table="com.zhongkai.model.config.Role" id="${param.id }"></mytag:View>
			<c:if test="${role==null }">
				<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table_form">
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td style="font-size:14px;font-weight:bold;text-align:center;color:red">!!!找不到该角色!!!</td>
					</tr>
				</table>
			</c:if>
			<c:if test="${role!=null }">
				<form action="system/config/role_manage_modify.do" method="post" onsubmit="return checkForm()">
					<input name="roleId" type="hidden" value="${role.roleId }" />
					<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table_form">
						<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
							<td align="right">角色名称：</td>
							<td><input name="roleName" id="roleName" value="${role.roleName }" /> *必填 如：超级管理员 </td>
						</tr>
						<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
							<td align="right">角色描述：</td>
							<td>
								<textarea name="roleNote" id="roleNote" cols="50" rows="3">${role.roleNote }</textarea>
								非必填，长度不能超过100 
							</td>
						</tr>
						<tr>
							<td colspan="2" class="form_button" style="padding-top:10px;">
								<input type="submit" value="保存" />
								<input type="reset" value="重置" />
							</td>
						</tr>
					</table>
				</form>
			</c:if>
		</div>
	</div>
</div>
</body>
</html>
